package com.pubinfo.passbook.common.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("发票申请单")
@Accessors(chain = true)
@TableName(value = "t_contract_invoice_apply")
public class TContractInvoiceApply {
    
    @ApiModelProperty("发票申请流水号")
    @TableId(value = "invoice_apply_id")
    private String invoiceApplyId;
    
    @ApiModelProperty("合同流水号")
    @TableField(value = "contract_id")
    private Integer contractId;
    
    @ApiModelProperty("发票流水号,收款后回写")
    @TableField(value = "invoice_id")
    private String invoiceId;
    @ApiModelProperty("对方单位")
    @TableField(value = "payer_name")
    private String payerName;
    
    @ApiModelProperty("纳税人识别号")
    @TableField(value = "TIN")
    private String tin;
    
    @ApiModelProperty("地址 电话")
    @TableField(value = "address_tel")
    private String addressTel;
  
  @ApiModelProperty("开户行")
  @TableField(value = "bank")
  private String bank;
  
  @ApiModelProperty("账号")
  @TableField(value = "account")
  private String account;
  @ApiModelProperty("支付中心订单号")
  private String bssOrderNum;
  
  @TableField(typeHandler = FastjsonTypeHandler.class)
  @ApiModelProperty("结果反刷数据")
  private JSONObject refreshJson;
  
  @ApiModelProperty("开票金额")
  @TableField(value = "invoice_amount")
  private BigDecimal invoiceAmount;
  
  @ApiModelProperty("税率")
  @TableField(value = "tax_rate")
  private BigDecimal taxRate;
  
  @ApiModelProperty("税金")
  @TableField(value = "tax_amount")
  private BigDecimal taxAmount;
  
  @ApiModelProperty("不含税金额")
  @TableField(value = "amount")
  private BigDecimal amount;
  
  @ApiModelProperty("状态 0 已提交申请 10已开发票")
  @TableField(value = "status")
  private Integer status;
  @ApiModelProperty("收款计划id")
  @TableField(value = "performance_id")
  private Integer performanceId;
  
  @ApiModelProperty("创建时间")
  @TableField(value = "create_time")
  private Date createTime;
  
  @ApiModelProperty("创建人")
  @TableField(value = "create_user")
  private String createUser;
}